﻿using System;

namespace Yaml.Presentation.Parsing.TokenScanners {
    class FlowEntryTokenScanner : BasicTokenScanner {

        public FlowEntryTokenScanner(Scanner scanner)
            : base(scanner, ',') {
        }

        protected override void AfterScan() {
            base.AfterScan();
            RemoveSimpleKey(true);
        }

        protected override Yaml.Presentation.Tokens.Token CreateToken() {
            return new Tokens.FlowEntryToken(Start, End, Scanner.State.FlowDepth);
        }
    }
}
